import { defineStore } from 'pinia'

const organizationStore = defineStore('organization', {
  state: () => ({
    info: {
      id: '',
      name: '',
      picture: '',
      contactName: '',
      contactTel: '',
      address: '',
      description: '',
    },
  }),
  getters: {},
  actions: {
    changeInfo(payload: any) {
      this.info = { ...payload }
    },
  },
  persist: {
    enabled: true,
    strategies: [
      {
        key: 'my_user',
        storage: localStorage,
      },
    ],
  },
})

export default organizationStore
